package com.crl.module.commands
{
	import com.crl.core.ICommand;
	
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	
	
	/**
	 *  
	 * @author crl;
	 * 
	 */	
	public class QueueableTask extends EventDispatcher implements ICommand 
	{
		public function QueueableTask()
		{
		}
		
		public function execute(e:*=null):void
		{
			//onComplete();
			throw new Error("You must override the QueueableCommand's execute method and specify your own logic");
		}
		
		
		/**
		 * 提供当前任务完成事件; 
		 * 
		 */		
		protected function onComplete():void
		{
			dispatchEvent(new Event(Event.COMPLETE));
		}
		
	}
}